<?php 
$fs = $f->getChildren();
?>


  
  <ul> 
  <?php foreach($fs as $ff): ?>
  <li>
  <?php if($ff->hasChildren()):?>
  <span class="folder">
  <?php echo $ff ?>
  <?php else: ?>
  <span class="file">
  			  		<?php if(in_array($ff->getId(),$arr)):?>
					<?php echo image_tag('/images/icons/checkbox.gif')?>
					<?php else: ?>
                    <?php echo checkbox_tag('material[mat2_folder_list][]',$ff->getId()) ?>
                    <?php endif ?>
  <label for="material_mat2_folder_list_<?php echo $ff->getId() ?>"><?php echo $ff ?></label>
  <?php endif ?>
  </span>
					
					<?php if($ff->hasChildren()):?>
					  <?php include_partial('zdFolder/item',array('f'=>$ff,'arr'=>$arr)) ;?>
					<?php endif ?>
  </li>
  <?php endforeach ?>
  </ul>					
